<div class="types index">
	<h2><?php __('Tipos Inactivos');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
<!--			<th><?php echo $this->Paginator->sort('Id','id');?></th>-->
			<th><?php echo $this->Paginator->sort('Nombre','name');?></th>
                        <th><?php echo $this->Paginator->sort('Fecha de Baja','termination_date');?></th>
<!--                        Este ultimo renglon lo agregue despues de agregar el campo "termination date"-->
			<th class="actions"><?php __('Opciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($types as $type):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
<!--		<td><?php echo $type['Type']['id']; ?>&nbsp;</td>-->
		<td><?php echo $type['Type']['name']; ?>&nbsp;</td>
                <td><?php 
                $fecha = date('d/m/Y', strtotime($type['Type']['termination_date']));
                echo $fecha; ?>&nbsp;</td>
<!--                        Este ultimo renglon lo agregue despues de agregar el campo "termination date"-->              
		<td class="actions">
			<?php echo $this->Html->link(__('Ver', true), array('action' => 'view', $type['Type']['id'])); ?>
			<?php echo $this->Html->link(__('Deshacer Baja', true), array('action' => 'deshacer_baja', $type['Type']['id'])); ?>
                        <?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $type['Type']['id']), null, sprintf(__('Esta seguro que desea eliminar el tipo # %s?', true), $type['Type']['name'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Página %page% de %pages%, mostrando %current% registros de %count% en total, a partir del registro %start%, terminando en el %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<!--<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Type', true), array('action' => 'add')); ?></li>
	</ul>
</div>-->